#include <REGX52.H>

sbit _74HC164_DATA=P0^1;
sbit _74HC164_CLK=P0^0;


void _74HC164_SendByte(unsigned char Byte)
{
    unsigned char i;
    _74HC164_DATA = 0;
    for(i=0;i<8;i++)
    {
        _74HC164_DATA=(Byte&(0x80>>i));
        _74HC164_CLK=1;
        _74HC164_CLK=0;
    }
    _74HC164_DATA=0;
}

void _74HC164_Init()
{
    _74HC164_CLK=0;
    _74HC164_DATA=0;
    _74HC164_SendByte(0xFF);
}
